import { request } from '@/utils/request-fetch'
const VUE_APP_CHAT_API = process.env.VUE_APP_CHAT_API

export function getAgentCatgoriesApi (params) {
  return request(
    'GET',
    `${VUE_APP_CHAT_API}/wechatgpt/api/v1/category/list`,
    params
  )
}

export function getAgentListApi (params) {
  return request(
    'GET',
    `${VUE_APP_CHAT_API}/wechatgpt/api/v1/assistant/list`,
    params
  )
}

export function getAgentDetailApi (id) {
  return request(
    'GET',
    `${VUE_APP_CHAT_API}/wechatgpt/api/v1/assistant/${id}/detail`
  )
}

export function starAgentApi (id) {
  return request(
    'POST',
    `${VUE_APP_CHAT_API}/wechatgpt/api/v1/assistant/${id}/star`
  )
}

export function unstarAgentApi (id) {
  return request(
    'POST',
    `${VUE_APP_CHAT_API}/wechatgpt/api/v1/assistant/${id}/unstar`
  )
}
